from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from django.conf import settings

class Message(models.Model):
    title       = models.CharField(_('title'),max_length=60,blank=False)
    from_user   = models.ForeignKey(settings.AUTH_USER_MODEL,related_name="user_sent",blank=False)
    to_user     = models.ForeignKey(settings.AUTH_USER_MODEL,related_name="user_received",blank=False)
    content = models.TextField(_("content"))
    time_stamp = models.DateTimeField(_('time stamp'),default=timezone.now)
    
    
class Notification(models.Model):
    to_user     = models.ForeignKey(settings.AUTH_USER_MODEL)
    category    = models.IntegerField(_("category"))
    content     = models.CharField(_("content"),max_length=255)
    link        = models.CharField(_("content"),max_length=255)
    
